<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>SWFUpload Demos - Simple Demo</title>
<%@ include file="/commonjsp/baseUtil.jsp"%>
<script type="text/javascript"
	src="${pageContext.request.contextPath}/upload_js/swfupload.js"></script>
<script type="text/javascript"
	src="${pageContext.request.contextPath}/upload_js/plugins/swfupload.queue.js"></script>
<script type="text/javascript"
	src="${pageContext.request.contextPath}/test/upload1.js"></script>
<script type="text/javascript"
	src="${pageContext.request.contextPath}/test/upload2.js"></script>
<script type="text/javascript">
	var swfu;
	window.onload = function() {
		var settings = {
			upload_url : ROOTPATH + "/postJson/uploadFile.aspx",
			flash_url : ROOTPATH + "/upload_js/Flash/swfupload.swf",
			//post_params: {"PHPSESSID" : ""},
			file_size_limit : "100 MB",
			file_post_name : "file",
			file_types : "*.*",
			file_types_description : "图片文件",
			file_upload_limit : 100,
			file_queue_limit : 0,
			custom_settings : {
				progressTarget : "fsUploadProgress"
			//cancelButtonId : "btnCancel"
			},
			debug : false,

			// Button settings
			button_image_url : ROOTPATH + "/img/upload01.png",
			button_width : "65",
			button_height : "30",
			button_placeholder_id : "spanButtonPlaceHolder",
			button_text : '<span class="theFont">Hello</span>',
			button_text_style : ".theFont { font-size: 16;color: #FF0000; }",
			button_text_left_padding : 12,
			button_text_top_padding : 3,

			// The event handler functions are defined in handlers.js
			file_queued_handler : fileQueued,
			file_queue_error_handler : fileQueueError,
			file_dialog_complete_handler : fileDialogComplete,
			upload_start_handler : uploadStart,
			upload_progress_handler : uploadProgress,
			upload_error_handler : uploadError,
			upload_success_handler : uploadSuccess,
			upload_complete_handler : uploadComplete,
			queue_complete_handler : queueComplete
		// Queue plugin event
		};
		swfu = new SWFUpload(settings);
	};
</script>
</head>
<body>
	<div id="content">
		<form id="form1" action="index.php" method="post"
			enctype="multipart/form-data">
			<div class="fieldset flash" id="fsUploadProgress">
				<span class="legend">上传队列</span>
			</div>
			<div id="divStatus">已上传0个文件</div>
			<div>
				<span id="spanButtonPlaceHolder"></span>
				<input id="btnCancel"
					type="button" value="取消所有已上传"
					onclick="swfu.cancelQueue();" disabled="disabled"
					style="margin-left: 2px; font-size: 8pt; height: 29px;" />
			</div>
		</form>
	</div>
</body>
</html>
